package com.atguigu.spzx.cloud.user.controller;

import com.atguigu.spzx.cloud.model.entity.User;
import com.atguigu.spzx.cloud.user.service.api.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api/user")
public class UserController {
	@Autowired
	private UserService userService ;

	@GetMapping(value = "/findUserByUserId/{userId}")
	public User findUserByUserId(@PathVariable(value = "userId") Long userId) {
		return userService.findUserByUserId(userId) ;
	}
}
